package com.sk.bilibili.dto;

import com.sk.bilibili.bean.Danmu;
import com.sk.bilibili.other.ExtraMap;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @author 邵康
 * @date 2021/12/2 14:23
 */
@Data
@NoArgsConstructor
public class DanmuInfo {

    // 0 弹幕人数      1 弹幕信息
    private Integer type;
    private Integer online;
    private Danmu danmu;

    public DanmuInfo(Integer type) {
        this.type = type;
    }

    public static DanmuInfo onlineInfo(Integer num){
        DanmuInfo danmuInfo = new DanmuInfo(0);
        danmuInfo.setOnline(num);
        return danmuInfo;
    }

    public static DanmuInfo danmuInfo(Danmu danmu){
        DanmuInfo danmuInfo=new DanmuInfo(1);
        danmuInfo.setDanmu(danmu);
        return danmuInfo;
    }

}
